import { http } from '@/utils'

// 1.获取新闻列表
export interface ListResponse {
    code: number;
    data: Datum[];
    head: Head[];
    [property: string]: any;
}

export interface Datum {
    alt: string;
    default_image: string;
    description: string;
    id: number;
    release_time: string;
    title: string;
    [property: string]: any;
}

export interface Head {
    alt?: string;
    content?: null;
    default_image?: string;
    description?: null;
    id?: number;
    keywords?: null;
    title?: string;
    [property: string]: any;
}

export function fetchNewsListAPI() {
    return http.request<ListResponse>({
        url: '/news/list/',
    })
}

